//
//  UIAlertController+TintColor.m
//  ocCrazy
//
//  Created by Ajen on 2019/1/7.
//  Copyright © 2019 dukai. All rights reserved.
//

#import "UIAlertController+TintColor.h"
#import <objc/message.h>
#import <objc/runtime.h>
@implementation UIAlertController (TintColor)
+(void)load{
    //交换方法
    Method addAction = class_getInstanceMethod(self, @selector(addAction:));
    Method ajen_addAction = class_getInstanceMethod(self, @selector(ajen_addAction:));
    method_exchangeImplementations(addAction, ajen_addAction);
}

//实现交换的方法
- (void)ajen_addAction:(UIAlertAction *)action{
    self.view.tintColor = [UIColor colorWithAjenHexString:@"#2d2e36"];
    [self ajen_addAction:action];
}
@end
